function parseFundData(csv){
	var oarray = new Array();
	var arrstr = csv.split(/\s+/);
	for(var i=0;i<arrstr.length;i++){
		var arr = arrstr[i].split(/,/);
		oarray.push(arr);
	}
	return oarray;
}
function prepareForFlot(arr, labelstep){
	var maxval=NaN;
	var minval=NaN;
	var oarray = new Array();
	var xarray = new Array();
	
	for(var i = 0 ;i<arr[0].length;i++){
		var oobj = [i];
		var hasval = false;
		var val = arr[1][i];
		if((i % labelstep)==0){
			xarray.push([i,(arr[0][i]).replace(/([0-9]{4})([0-9]{2})([0-9]{2})/,'$1/$2/$3')]);
		}
		if(!isNaN(parseFloat(val))){
			val = parseFloat(val);
			if(isNaN(maxval)){
				maxval = val;
				minval = val;
			}else{
				maxval=Math.max(val,maxval);
				minval=Math.min(val,minval);
			}
			hasval = true;
		}
		oobj = [i, val];
		if(hasval){
			oarray.push(oobj);
		}
	}
	oarray;
	return {"labels": xarray,"values": oarray, "maxval":maxval, "minval":minval};
}
